home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Macro assembler dev syst.adf / include / exec / io.i < prev    next >
Text File  |  1985-12-20  |  3KB  |  128 lines

  1.     IFND EXEC_IO_I
  2. EXEC_IO_I SET 1
  3. **********************************************************************
  4. *
  5. * Commodore-Amiga, Inc. -- ROM Operating System Executive Include File
  6. *
  7. **********************************************************************
  8. *
  9. *   Source Control:
  10. *
  11. *  $Header: io.i,v 1.0 85/08/28 15:10:43 carl Exp $
  12. *
  13. *  $Locker:  $
  14. *
  15. **********************************************************************
  16.  
  17.     IFND EXEC_PORTS_I
  18.     INCLUDE "exec/ports.i"
  19.     ENDC !EXEC_PORTS_I
  20.  
  21.     IFND EXEC_LIBRARIES_I
  22.     INCLUDE "exec/libraries.i"
  23.     ENDC !EXEC_LIBRARIES_I
  24.  
  25.  
  26. *----------------------------------------------------------------
  27. *
  28. *   IO Request Structures
  29. *
  30. *----------------------------------------------------------------
  31.  
  32. *------ Required portion of IO request:
  33.  
  34.  STRUCTURE  IO,MN_SIZE
  35.     APTR    IO_DEVICE         * device node pointer
  36.     APTR    IO_UNIT           * unit (driver private)
  37.     UWORD   IO_COMMAND        * device command
  38.     UBYTE   IO_FLAGS          * special flags
  39.     BYTE    IO_ERROR          * error or warning code
  40.     LABEL   IO_SIZE
  41.  
  42.  
  43. *------ Standard IO request extension:
  44.  
  45.     ULONG   IO_ACTUAL         * actual # of bytes transfered
  46.     ULONG   IO_LENGTH         * requested # of bytes transfered
  47.     APTR    IO_DATA           * pointer to data area
  48.     ULONG   IO_OFFSET         * offset for seeking devices
  49. *   ULONG   IO_RESERVED1
  50. *   ULONG   IO_RESERVED2
  51.     LABEL   IOSTD_SIZE
  52.  
  53.  
  54. *------ IO_FLAGS bit definitions:
  55.  
  56.     BITDEF  IO,QUICK,0        * complete IO quickly
  57.  
  58.  
  59. *----------------------------------------------------------------
  60. *
  61. *   Standard Device Library Functions
  62. *
  63. *----------------------------------------------------------------
  64.  
  65.        LIBINIT
  66.  
  67.        LIBDEF  DEV_BEGINIO    * process IO request
  68.        LIBDEF  DEV_ABORTIO    * abort IO request
  69.  
  70.  
  71. *----------------------------------------------------------------
  72. *
  73. *   IO Function Macros
  74. *
  75. *----------------------------------------------------------------
  76.  
  77. BEGINIO      MACRO
  78.        LINKLIB DEV_BEGINIO,IO_DEVICE(A1)
  79.        ENDM
  80.  
  81. ABORTIO      MACRO
  82.        LINKLIB DEV_ABORTIO,IO_DEVICE(A1)
  83.        ENDM
  84.  
  85.  
  86. *----------------------------------------------------------------
  87. *
  88. *   Standard Device Command Definitions
  89. *
  90. *----------------------------------------------------------------
  91.  
  92. *------ Command definition macro:
  93. DEVINIT     MACRO   * [baseOffset]
  94.          IFC       '\1',''
  95. CMD_COUNT   SET     CMD_NONSTD
  96.          ENDC
  97.          IFNC    '\1',''
  98. CMD_COUNT   SET       \1
  99.          ENDC
  100.             ENDM
  101.  
  102. DEVCMD      MACRO   * cmdname
  103. \1          EQU      CMD_COUNT
  104. CMD_COUNT   SET       CMD_COUNT+1
  105.        ENDM
  106.  
  107.  
  108. *------ Standard device commands:
  109.  
  110.        DEVINIT 0
  111.  
  112.        DEVCMD  CMD_INVALID    * invalid command
  113.        DEVCMD  CMD_RESET      * reset as if just inited
  114.        DEVCMD  CMD_READ       * standard read
  115.        DEVCMD  CMD_WRITE      * standard write
  116.        DEVCMD  CMD_UPDATE     * write out all buffers
  117.        DEVCMD  CMD_CLEAR      * clear all buffers
  118.        DEVCMD  CMD_STOP       * hold current and queued
  119.        DEVCMD  CMD_START      * restart after stop
  120.        DEVCMD  CMD_FLUSH      * abort entire queue
  121.  
  122.  
  123. *------ First non-standard device command value:
  124.  
  125.        DEVCMD  CMD_NONSTD
  126.  
  127.     ENDC !EXEC_IO_I
  128.